<div class="modal fade" id="updataModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <form method="post" action="{:url('ClubAdmin/VideosController/update')}" enctype="multipart/form-data">

            <div class="modal-content">
                <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">更新</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    
                </div>

               <div class="modal-body">

                    <div class="form-group">
                        <label for="name">视频名</label>
                        <input type="text" class="form-control" name="vname"  id="vname">
                    </div>

                       <div class="form-group">
                        <label for="name">视频</label>
                      <td><input type="file" name="vfile" >
                      <input type="hidden" name="vfile" value="" id="hidden1" >
                     <video src="" id="vfile" style="width: 180px;height: 80px" >
                     </td>
                    </div>
                       <div class="form-group">
                        <label for="name">视频简介</label>
                        <input type="text" class="form-control" name="vintro" id="vintro">
                    
                  <input type="hidden" name="vid" value="" id="hidden2" >
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">确认修改</button>
                </div>

            </div><!-- /.modal-content -->
        </form>
    </div><!-- /.modal -->
</div>
<script type="text/javascript">
        function jsedit(vid)
        {
            //console.log(aid);
           $.ajax({
            url:"{:url('videos_controller/edit')}",
            data:{
                "vid":vid
            },
            dataType:'json',
            success(data){
               console.log(data);
          $("#vname").val(data.vname);
console.log(data.cname);
          $("#vintro").val(data.vintro);

          $("#vfile").attr('src',"__STATIC__/video/"+data.vfile); 

          $("#hidden1").val(data.vfile);

          $("#hidden2").val(data.vid);

            }
        }); 
        }

    </script>